﻿using System;
using System.Text;
using System.Collections.Generic;


namespace EpisodeWizard.Core
{

    public abstract class QueryPlugin
    {

        /// <summary>
        /// The name of the DB engine
        /// </summary>
        public abstract string Name
        {
            get;
        }

        /// <summary>
        /// The description of how/where the DB engines retrieves the data
        /// </summary>
        public abstract string Description
        {
            get;
        }

		/// <summary>
		/// Initialize the plugin
		/// This can be used for example to cache some information from the database
		/// </summary>
		public abstract void Initialize();

		public delegate void InitializeProgressHandler(int Percent, string Text1, string Text2);
		public event InitializeProgressHandler InitializeProgress;

		protected void OnInitializeProgress(int Percent, string Text1, string Text2)
		{
			if (InitializeProgress != null)
			{
				InitializeProgress(Percent, Text1, Text2);
			}
		}

        /// <summary>
        /// Returns the names of TV shows in the database
		/// The list is used to identify the episodes more easily
        /// </summary>
		public abstract List<TVShowPluginId> GetSimilarShows(FuzzyString ShowName);
		
        /// <summary>
        /// Returns info about a particular episode
        /// </summary>
		public abstract EpisodeInfo GetEpisodeInfo(string TVShow, int Season, int Episode);

    }

}

